<extend name="Common/common"/>
<block name="main">
    <div class="right-title">名方验方</div>
    <div class="right-search">
        <form action="#" method="get" class="search-form">
            <input type="hidden" name="o" value="1">
            <div class="search-input-wrap">
                <i class="arrow"></i>
                <input autocomplete="off" class="search-input"  id="name" value="{$name}" placeholder="输入病名" type="text" maxlength="50">
            </div>
            <a href="javascript:;" class="search-btn" id="search">查询</a>
        </form>
    </div>
    <div class="right-content">
        <table border="0" class="patinet-content">
            <tr class="patient">
                <td>处方名</td>
                <td>创建时间</td>
                <td>操作</td>
            </tr>
            <volist name="list" id="vo">
                <tr class="patient nobg">
                    <td>{$vo.prescription_name}</td>
                    <td>{$vo.create_time}</td>
                    <td>
                        <span class="patientdetails"  onclick="location.href='{:U('recipedetail',array('id'=>$vo['id']))}'">详情</span>
                    </td>
                </tr>
            </volist>
        </table>
        <div class="page">{$pageHtml}</div>
    </div>
</block>
<block name="css"></block>
<block name="js">
    <script type="text/javascript">
        $(function(){
            //搜索处方
            $('#search').click(function () {
                var name = $('#name').val();
                var url = '{:U("recipe")}';
                if(name){
                    url += '?name='+name;
                }
                location.href = url;
            });
        });
    </script>
</block>